package com.chen.ssm.service.impl;

import com.chen.ssm.dao.IUserDao;
import com.chen.ssm.entity.User;
import com.chen.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * com.chen.ssm.service.impl
 * 作者      : 金博超
 * 描述      :
 * 创建日期  : 2020/11/11
 * 修改日期  :
 */

@Service("userService")
public class IUserService implements UserService {

  @Autowired
  private IUserDao userDao;


  public User login(User user) {
    return userDao.login(user);
  }

  public User getUserById(Integer id) {
    return userDao.selectByPrimaryKey(id);
  }

  public List<User> getUserList(User user) {
    return userDao.getUserList(user);
  }

  public Integer getCount(User user) {
    return userDao.getCount(user);
  }

  public User getUserByName(String username) {
    return null;
  }

  public void add(User user) {

  }

  public void update(User user) {

  }

  public Integer insertSelective(User user){
    return userDao.insertSelective(user);
  }

  public Integer updateByPrimaryKeySelective(User user) {
    return userDao.updateByPrimaryKeySelective(user);
  }

  public Integer deleteByPrimaryKey(Integer id) {
    return userDao.deleteByPrimaryKey(id);
  }
}
